netfilter: nft_set_hash: try later when GC hits EAGAIN on iteration
authorSasha Levin <sashal@kernel.org>
Fri, 22 Sep 2023 16:30:28 +0000 (18:30 +0200)
committerSalvatore Bonaccorso <carnil@debian.org>
Fri, 29 Sep 2023 04:15:31 +0000 (05:15 +0100)
commit9161742ca651b5c3adfe9a721e2ccec9a0640ac1
tree9b1fec8f62d5fd47454469d4bbb9987ada88123b
parent90cd15ab5571177fee775b11f1ee4f93c1346040
netfilter: nft_set_hash: try later when GC hits EAGAIN on iteration

commit b079155faae94e9b3ab9337e82100a914ebb4e8d upstream.

Skip GC run if iterator rewinds to the beginning with EAGAIN, otherwise GC
might collect the same element more than once.

Fixes: f6c383b8c31a ("netfilter: nf_tables: adapt set backend to use GC transaction API")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name netfilter-nft_set_hash-try-later-when-gc-hits-eagain.patch
net/netfilter/nft_set_hash.c